<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/11
 * Time: 8:26
 */

 class Shape
{
    public function getArea(){ }
     public static function getPi(){
         return 3.14;
     }
}
echo Shape::getPi();
class Rectangle extends Shape
{
    public $instance;
    private $width,$height;
    public function __construct($width,$height)
    {
        //$this->height=$height;
        //$this->width=$width;
    }
    public function getObj(){
        if ($instance==null)
        return new Rectangle();
    }
    public function getArea()
    {
        return $this->width*$this->height;
    }
}

